package com.gxa.web_admin.rabbitmq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component
public class RabbitMQListener {

    @RabbitListener(queues = "fanout.queueone")
    public void luoYang(String message) throws InterruptedException {
        System.out.println("罗阳接收消息："+message);
        Thread.sleep(100);
    }

    @RabbitListener(queues = "fanout.queuetwo")
    public void liGuoRui(String message) throws InterruptedException {
        System.out.println("李国瑞接收消息："+message);
        Thread.sleep(1000);
    }

}
